import request from '@/utils/request'

export function selectAll() {
  return request({
    url: `/new/selectAll`,
    method: 'get'
  })
}

// 添加
export function addNew(data) {
  return request({
    url: `/new/add`,
    method: 'post',
    data: data
  })
}

// 更新
export function updateNew(ganhaoid, data) {
  return request({
    url: `/new/update/${ganhaoid}`,
    method: 'put',
    data: data
  })
}

// 删除
export function deleteNew(ganhaoid) {
  return request({
    url: `/new/delete/${ganhaoid}`,
    method: 'delete'
  })
}

// 下载
export function downloadNew() {
  return request({
    url: `/new/download`,
    method: 'GET',
    responseType: 'blob'
  })
}